home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbtools1.arc / AEDIALO1.BAS < prev    next >
BASIC Source File  |  1987-12-10  |  2KB  |  57 lines

  1. rem $linesize:132
  2. rem $title:'Application Engineer Standard Routines'
  3. rem $subtitle:'Single Question Dialog box'
  4.  
  5. '                Include the COMMON values
  6. rem $include:'AESHARED.BAS'            
  7.     
  8. sub Dialog(st1$,ls1%) static
  9.  
  10.         locate ,,0
  11.         ae.sstack%=ae.sstack%+1000%                             ' Screen save stack
  12.         if ae.sstack%>10000% then
  13.             call ae.error("AEDT Screen Stack Overflow"+str$(ae.sstack%))
  14.         end if
  15.  
  16.         attr%=( ae.bg%(2%) and 7%)*16% + ae.fg%(2%)
  17.  
  18.         d%=ls1%
  19.         for j%=1% to 2%
  20.             k%=len(dialog$(j%))
  21.             if k%>d% then d%=k%
  22.         next j%
  23.         w%=d%+6%
  24.  
  25.         l.marg%=(80%-w%)/2%
  26.         t.marg%=9%
  27.         r.marg%=l.marg%+w%-1%
  28.         b.marg%=16%
  29.  
  30.         t.frame$=chr$(214%)+string$((w%-2%),196%)+chr$(183%)
  31.         b.frame$=chr$(211%)+string$((w%-2%),196%)+chr$(189%)
  32.         horz$=chr$(186%)+string$((w%-2%),32%)+chr$(186%)
  33.  
  34.         call getscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%,b.marg%,r.marg%,0%,0%)
  35.  
  36.         call xqprint(t.frame$,t.marg%,l.marg%,attr%,0%)
  37.         call xqprint(b.frame$,b.marg%,l.marg%,attr%,0%)
  38.  
  39.         for j%=t.marg%+1% to b.marg%-1%
  40.             call xqprint(horz$,j%,l.marg%,attr%,0%)
  41.         next j%
  42.  
  43.         l.marg%=l.marg%+4%
  44.  
  45.         call xqprint(dialog$(1),t.marg%+2%,l.marg%,attr%,0%)
  46.         call xqprint(dialog$(2),t.marg%+3%,l.marg%,attr%,0%)
  47.  
  48.         ipy1%=t.marg%+5%
  49.  
  50.         call I.Block.Frame(ipy1%,l.marg%,1%,ls1%,1%)
  51.         call Input.Block(ipy1%,l.marg%,1%,ls1%,st1$,0%)
  52.  
  53.         call putscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%-4%,b.marg%,r.marg%,0%,0%)
  54.         locate ,,0
  55.         ae.sstack%=ae.sstack%-1000%
  56.     end sub
  57.